home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / util / sys / msys_1_2.lha / Doc / requestchoice.doc < prev   
Text File  |  1996-12-27  |  3KB  |  63 lines

  1. C/RequestChoice                                               C/RequestChoice
  2.  
  3.    NAME
  4.        RequestChoice -- create and handle a decision requester. (V39)
  5.  
  6.    SYNOPSIS
  7.        RequestChoice Title Body Button1 Button2 ... ButtonN
  8.        [PUBSCREEN=PubScreenName] [TIMEOUT=TimeoutValue]
  9.  
  10.    TEMPLATE
  11.        RequestChoice "TITLE/A,BODY/A,GADGETS/A/M,PUBSCREEN/K,TIMEOUT/K/N"
  12.  
  13.    FUNCTION
  14.        Opens a requester window on a given public screen with a choice of
  15.        one or more buttons. Chosen button number is printed. Buttons are
  16.        numbered from left to right, with the leftmost button being number
  17.        1. The rightmost button has a number 0 assigned to it. If there is
  18.        only one button, it is treated as 0.
  19.        A requester can cancel itself after a specified amount of time. In
  20.        such case 0 is returned and printed.
  21.  
  22.    INPUTS
  23.        TITLE     - a title of the requester window.
  24.        BODY      - a text to appear inside requester window.
  25.        GADGETS   - one or more strings representing button texts.
  26.        PUBSCREEN - name of the public screen the requester should appear on.
  27.                    If the screen is unavailable, the requester will appear
  28.                    on default public screen - in most cases Workbench.
  29.        TIMEOUT   - a value given in seconds after which a requester will
  30.                    cancel itself.
  31.  
  32.    RESULT
  33.        RETURN_FAIL  - if 'dos.library' or 'intuition.library' couldn't be
  34.                       opened.
  35.        RETURN_ERROR - if command line arguments couldn't be processed or
  36.                       there wasn't enough memory.
  37.        RETURN_WARN  - if a given public screen couldn't be found or there
  38.                       was a problem building a requster.
  39.        RETURN_OK    - if everything went OK.
  40.  
  41.    EXAMPLE
  42.        RequestChoice "Test1" "Choose OK or Cancel" "OK" "Cancel"
  43.            ; Puts a requester with 'Test' title, 'Choose OK or Cancel' text
  44.            ; inside requester window and two buttons named 'OK' and
  45.            ; 'Cancel'. If a user presses 'OK', '1' will be printed. If a
  46.            ; user presses 'Cancel', '0' will be printed.
  47.        RequestChoice "Test2" "Select number" "1" "2" "3" "4" "5"
  48.                      PUBSCREEN="DOPUS.1" TIMEOUT=10
  49.            ; Puts a requester with five choices buttons on Directory Opus'
  50.            ; screen. If a user doesn't press any button within ten seconds,
  51.            ; a requester will cancel itself and '0' will be printed.
  52.  
  53.    NOTES
  54.        This version of the command differs from original in that it will
  55.        create a requester even if a given public screen doesn't exist.
  56.  
  57.    BUGS
  58.        Timeouts are precise to about 1/3 of a second.
  59.  
  60.    SEE ALSO
  61.        intuition.library/EasyRequestArgs().
  62.  
  63.